<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>滚动</title>
    <style>
        * {
      margin: 0px;
      padding: 0px;
  }

  div {
      height: 100vh;
      background: rgba(0, 0, 0, .7);
      color: #fff;
      line-height: 100vh;
      text-align: center;
      font-size: 20vh;
      background-repeat: no-repeat;
  }

  .img1 {
      background-image: url(https://img1.baidu.com/it/u=1494163501,3385442683&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=500);
      background-attachment: fixed;
  }

  .img2 {
      background-image: url(hhttps://img1.baidu.com/it/u=999135798,1460406615&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500);
      background-attachment: fixed;

  }

  .img3 {
      background-image: url(https://img2.baidu.com/it/u=4284680107,1075571090&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800);
      background-attachment: fixed;

  }
    </style>
</head>
<body>
    <div class="txt1">头部</div>
    <div class="bg img1"></div>
    <div class="txt1">内容</div>
    <div class="bg img2"></div>
    <div class="txt1">底部</div>
    <div class="bg img3"></div>
</body>
</html>